import { exInput, exSelect, exColorPicker, exIcon, exInputNumber } from '@ve/common/components/extension'

export default {
  VERSION: '20220617',
  type: 'uiPopover',
  name: '提示组件',
  icon: 'information-line',
  svg: 'tishi',
  //扩展
  extension: {
    textContent: exInput('标签文字', '提示'),
    icon: exIcon('图标', ''),
    fontSize: exInput('文字大小', '12px', '文字大小以px为单位'),
    fontWeight: exSelect('字体粗细', 'font-thin', [
      { value: 'font-thin', label: '默认' },
      { value: 'font-extralight', label: '200' },
      { value: 'font-light', label: '300' },
      { value: 'font-normal', label: '400' },
      { value: 'font-medium', label: '500' },
      { value: 'font-semibold', label: '600' },
      { value: 'font-bold', label: '700' },
      { value: 'font-extrabold', label: '800' },
      { value: 'font-black', label: '900' },
    ]),
    colorText: exColorPicker('字体颜色', '#000000'),
    padding: {
      type: 'exInputNumber',
      name: '内边距',
      value: 1,
      min: 0,
      max: 12,
    },
    colorBg: {
      type: 'exBgColorSelect',
      name: '背景颜色',
      value: 'bg-white',
    },
    border: {
      type: 'exBorderSelect',
      name: '边框厚度',
      value: 'border-0',
    },
    rounded: {
      type: 'exRoundedSelect',
      name: '边框圆角',
      value: 'rounded-none',
    },
    // ...exDivider(0),
    placement: {
      type: 'exRadioGroup',
      name: '弹出位置',
      value: 'top-start',
      list: [
        {
          label: '上左',
          value: 'top-start',
        },
        {
          label: '上中',
          value: 'top',
        },
        {
          label: '上右',
          value: 'top-end',
        },
        {
          label: '下左',
          value: 'bottom-start',
        },
        {
          label: '下中',
          value: 'bottom',
        },
        {
          label: '下右',
          value: 'bottom-end',
        },
        {
          label: '左侧',
          value: 'left',
        },
        {
          label: '右侧',
          value: 'right',
        },
      ],
    },
    trigger: {
      type: 'exRadioGroup',
      name: '触发方式',
      value: 'hover',
      list: [
        {
          label: '悬停',
          value: 'hover',
        },
        {
          label: '点击',
          value: 'click',
        },
      ],
    },
    popoverWidth: exInputNumber('宽度', 200, 150),
    popoverText: {
      type: 'exTextarea',
      name: '内容文字',
      value: '提示内容',
    },
    contentFontSize: exInput('文字大小', '12px', '文字大小以px为单位'),
    contentFontWeight: exSelect('字体粗细', 'font-thin', [
      { value: 'font-thin', label: '默认' },
      { value: 'font-extralight', label: '200' },
      { value: 'font-light', label: '300' },
      { value: 'font-normal', label: '400' },
      { value: 'font-medium', label: '500' },
      { value: 'font-semibold', label: '600' },
      { value: 'font-bold', label: '700' },
      { value: 'font-extrabold', label: '800' },
      { value: 'font-black', label: '900' },
    ]),
    contentTextColor: exColorPicker('内容颜色', '#000000'),
    contentBgColor: {
      type: 'exBgColorSelect',
      name: '内容背景',
      value: 'bg-white',
    },
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
}
